home *** CD-ROM | disk | FTP | other *** search
- %case include%
- #include <CPopupMenu.h>
- %case instance%
- CPopupMenu *%itemname%;
- %case create%
-
- %itemname% = new (CPopupMenu);
- %itemname%->IViewRes ('PopM', %paneID%, enclosure, supervisor);
- %if not labelName = %
- %itemname%->SetLabelText (%labelName%);
- %labelName%->SetFontNumber (0); /* System, Chicago */
- %endif%
- %case itemNr%
- %DefineItem%
- %case dialog field%
- short% %%fieldname%;
- %haveField%
- %case init field%
- info->%fieldname% = 1;
- %case auxiliary%
- /*----------*/
- short x%fieldname%;
-
- /*----------*/
- static pascal void Draw%itemname% (DialogPtr whichDialog,
- short itemNr);
- static pascal void Draw%itemname% (whichDialog, itemNr)
- DialogPtr whichDialog;
- short itemNr;
- {
- %if lang = MPW%
- #pragma unused (whichDialog)
-
- %end if%
- DrawPopup (itemNr, %popupID%, x%fieldname%);
- } /*Draw%itemname%*/
-
- %case filter%
- %case set%
- x%fieldname% = info->%fieldname%;
- SetUserItem (%itemname%, (ProcPtr) &Draw%itemname%);
- %case hit%
- case %itemname%:
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- DoPopup (%itemname%, %popupID%, &info->%fieldname%);
- x%fieldname% = info->%fieldname%;
- %if not labelName = %
- InvertLabel (%labelName%);
- %endif%
- break;
- %case finish%
-